﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Avaliacao.Controllers
{
    public class TesteUploadController : BaseController
    {
        //
        // GET: /TesteUpload/

        public ActionResult Index()
        {
            return View();
        }

        public ActionResult Salvar()
        {
            HttpPostedFileBase file = Request.Files[0];

            file.SaveAs(@"C:\_roberto\_Projetos\MVC\Projeto\AvaliacaoOnline\Avaliacao\Uploads\" + file.FileName);

            return new JsonResult()
            {
                Data = new
                {
                    Path = @"http://localhost:57116/uploads/" + file.FileName,
                }
            };
        }
    }
}
